﻿using System;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Abp.Application.Services.Dto;
using Abp.Extensions;
using LeadThing.AbpZeroTemplate.BasicPersons;
using LeadThing.AbpZeroTemplate.EntityFramework;

namespace LeadThing.AbpZeroTemplate.BasicPersons.EntityMapper.BasicPersons
{

    /// <summary>
    /// 莒县人口基本信息的数据配置文件
    /// </summary>
    public class BasicPersonCfg : EntityTypeConfiguration<BasicPerson>
    {
        /// <summary>
        ///  构造方法[默认链接字符串< see cref = "AbpZeroTemplateDbContext" /> ]
        /// </summary>
        public BasicPersonCfg()
        {
            ToTable("BasicPerson", AbpZeroTemplateConsts.SchemaName.Basic);


            // 姓名
            Property(a => a.Name).HasMaxLength(50);
            // 身份证号
            Property(a => a.IDCard).HasMaxLength(18);
            // 家庭关系
            Property(a => a.Relationship).HasMaxLength(50);
            // 从事行业
            Property(a => a.Industry).HasMaxLength(100);
            // 承包田亩数
            Property(a => a.ContractField).HasMaxLength(50);
            // 责任田亩数
            Property(a => a.ResponsibilityField).HasMaxLength(50);
            // 门牌号
            Property(a => a.HouseNumber).HasMaxLength(50);
            // 楼房
            Property(a => a.Building).HasMaxLength(50);
            // 平房
            Property(a => a.Bungalow).HasMaxLength(50);
            // 政治面貌
            Property(a => a.Politics).HasMaxLength(50);
        }
    }
}